using System.Collections.Generic;
using UnityEngine;

namespace Kayac
{
	public static class MeshOptimizer
	{
		private class Band
		{
			public LinkedList<int> indices;

			public Vector3 normal;

			public Band(int i0, int i1, int i2, IReadOnlyList<Vector3> positions)
			{
			}

			public string ToString(IReadOnlyList<Vector3> positions)
			{
				return null;
			}

			public override string ToString()
			{
				return null;
			}

			public void Triangulate(IReadOnlyList<Vector3> positions, List<int> dstIndices)
			{
			}

			public void Simplify()
			{
			}

			public bool TryMerge(Band other)
			{
				return false;
			}

			public void RemoveRedundant(IReadOnlyList<Vector3> positions, float parallelThreshold)
			{
			}

			private bool CanCut(LinkedListNode<int> cutBegin, LinkedListNode<int> cutVertex, LinkedListNode<int> cutEnd, IReadOnlyList<Vector3> positions, Vector3 normal)
			{
				return false;
			}

			private static bool TestInclusionPointInTriangle(Vector3 p, Vector3 t0, Vector3 t1, Vector3 t2, Vector3 normal)
			{
				return false;
			}

			private static bool TestIntersectionLineSegment(Vector3 p0, Vector3 v0, Vector3 p1, Vector3 v1, Vector3 normal)
			{
				return false;
			}

			private void Merge(Band other, LinkedListNode<int> p0, LinkedListNode<int> p1)
			{
			}
		}

		private struct PosNrm
		{
			public Vector3 position;

			public Vector3 normal;
		}

		public static void Optimize(IReadOnlyList<Vector3> srcPositions, IReadOnlyList<Vector3> srcNormals, IReadOnlyList<int> srcIndices, List<Vector3> dstPositions, List<Vector3> dstNormals, List<int> dstIndices, float parallelThreshold = 0.9999f, int precisionBits = 10)
		{
		}

		private static void CreateBands(IReadOnlyList<Vector3> positions, IReadOnlyList<int> srcIndices, LinkedList<Band> bands)
		{
		}

		private static void QuantizeNumbers(IReadOnlyList<Vector3> src, List<Vector3> dst, int precisionBits)
		{
		}

		private static float QuantizeNumber(float x, int precision)
		{
			return 0f;
		}

		private static void MergeVertices(IReadOnlyList<Vector3> srcPositions, IReadOnlyList<Vector3> srcNormals, IReadOnlyList<int> srcIndices, List<Vector3> dstPositions, List<Vector3> dstNormals, List<int> dstIndices)
		{
		}

		private static void Count(IReadOnlyList<Vector3> positions, IReadOnlyList<Vector3> normals, IReadOnlyList<int> srcIndices)
		{
		}

		private static void DumpMesh(IReadOnlyList<Vector3> positions, IReadOnlyList<int> indices)
		{
		}
	}
}
